﻿<UserControl x:Class="VmroleAuthor.Views.VmRoleResourceDefinitionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignWidth="900">
    <Grid VerticalAlignment="Top" ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>

        <!-- Name -->
        <Label Grid.Row="1" Grid.Column ="0" >Name</Label>
        <TextBox x:Name="ResExtName" Grid.Row="1" Grid.Column="2" Text="{Binding Name, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
        <ContentPresenter Grid.Row="2" Grid.Column="2" Content="{Binding ElementName=ResExtName, Path=(Validation.Errors).CurrentItem}" />

        <!-- Version -->
        <Label Grid.Row="3" Grid.Column ="0" >Version</Label>
        <TextBox x:Name="Version" Grid.Row="3" Grid.Column="2" Text="{Binding Version, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
        <ContentPresenter Grid.Row="4" Grid.Column="2" Content="{Binding ElementName=Version, Path=(Validation.Errors).CurrentItem}" />

        <!-- Publisher -->
        <Label Grid.Row="5" Grid.Column ="0" >Publisher</Label>
        <TextBox x:Name="Publisher" Grid.Row="5" Grid.Column="2" Text="{Binding Publisher, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
        <ContentPresenter Grid.Row="6" Grid.Column="2" Content="{Binding ElementName=Publisher, Path=(Validation.Errors).CurrentItem}" />

        <!--Details -->
        <Expander  Grid.Row="7" Grid.ColumnSpan="3" Header="Schema Details">
            <Grid VerticalAlignment="Top" ShowGridLines="False">
                <Grid.RowDefinitions>
                    <RowDefinition Height="6" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition MinHeight="30" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition MinHeight="30" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="6"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="6"/>
                </Grid.ColumnDefinitions>
                <!--SchemaVersion -->
                <Label Grid.Row="1" Grid.Column ="0" >SchemaVersion</Label>
                <TextBox x:Name="SchemaVersion" Grid.Row="1" Grid.Column="2" Text="{Binding SchemaVersion, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
                <ContentPresenter Grid.Row="2" Grid.Column="2" Content="{Binding ElementName=SchemaVersion, Path=(Validation.Errors).CurrentItem}" />

                <!-- Type -->
                <Label Grid.Row="3" Grid.Column ="0" >Type</Label>
                <TextBox x:Name="Type" Grid.Row="3" Grid.Column="2" Text="{Binding Type, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" />
                <ContentPresenter Grid.Row="4" Grid.Column="2" Content="{Binding ElementName=Type, Path=(Validation.Errors).CurrentItem}" />
            </Grid>
        </Expander>

        
        
    </Grid>
</UserControl>
